import request from '@/utils/request'

export function getDoctorData(sort_key, sort_val, page = 1, per_page = 5) {
  return request({
    url: `/doctor/list`,
    method: 'get',
    params: {
      sort_key,
      sort_val,
      page,
      per_page
    }
  })
}
export function getQuestionList(page = 1, per_page = 8, class_id, type = 'question') {
  if (class_id) {
    return request({
      url: `/content`,
      method: 'get',
      params: {
        type,
        page,
        per_page,
        class_id
      }
    })
  } else {
    return request({
      url: `/content`,
      method: 'get',
      params: {
        type,
        page,
        per_page
      }
    })
  }
}
